/*******************************************************************************
 * Size: 16 px
 * Bpp: 4
 * Opts: undefined
 ******************************************************************************/

#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl.h"
#endif

#ifndef LV_CUSTOMER_FONT_SOURCEHANSERIFSC_REGULAR_16
#define LV_CUSTOMER_FONT_SOURCEHANSERIFSC_REGULAR_16 1
#endif

#if LV_CUSTOMER_FONT_SOURCEHANSERIFSC_REGULAR_16

/*-----------------
 *    BITMAPS
 *----------------*/

/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
    /* U+5355 "单" */
    0x0, 0x0, 0x10, 0x0, 0x0, 0x3, 0x0, 0x0,
    0x0, 0x0, 0x88, 0x0, 0x0, 0x3f, 0x60, 0x0,
    0x0, 0x0, 0xd, 0x70, 0x0, 0xc6, 0x0, 0x0,
    0x0, 0x13, 0x5, 0x70, 0x7, 0x50, 0x24, 0x0,
    0x0, 0x1f, 0x77, 0x79, 0xe7, 0x77, 0xad, 0x10,
    0x0, 0x1e, 0x0, 0x3, 0xc0, 0x0, 0x5a, 0x0,
    0x0, 0x1f, 0x77, 0x79, 0xe7, 0x77, 0xaa, 0x0,
    0x0, 0x1e, 0x0, 0x3, 0xc0, 0x0, 0x5a, 0x0,
    0x0, 0x1e, 0x0, 0x3, 0xc0, 0x0, 0x5a, 0x0,
    0x0, 0x1f, 0x77, 0x79, 0xe7, 0x77, 0xaa, 0x0,
    0x0, 0x4, 0x0, 0x3, 0xc0, 0x0, 0x11, 0x40,
    0x27, 0x77, 0x77, 0x79, 0xe7, 0x77, 0x78, 0xf9,
    0x0, 0x0, 0x0, 0x3, 0xc0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x3, 0xc0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x3, 0xb0, 0x0, 0x0, 0x0,

    /* U+636E "据" */
    0x0, 0x7, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x1e, 0x0, 0xa7, 0x77, 0x77, 0x78, 0xc1,
    0x0, 0x1e, 0x0, 0xc2, 0x0, 0x0, 0x3, 0xd0,
    0x0, 0x1e, 0x31, 0xc2, 0x0, 0x0, 0x3, 0xc0,
    0x17, 0x8f, 0xa8, 0xc9, 0x77, 0x77, 0x79, 0xc0,
    0x0, 0x1e, 0x0, 0xd2, 0x0, 0xa6, 0x1, 0x40,
    0x0, 0x1e, 0x0, 0xe2, 0x0, 0xc3, 0x0, 0x60,
    0x0, 0x1e, 0x55, 0xf8, 0x77, 0xe9, 0x79, 0xb4,
    0x15, 0xaf, 0x30, 0xf0, 0x0, 0xc3, 0x0, 0x0,
    0x5c, 0x6e, 0x1, 0xd1, 0x0, 0xc3, 0x0, 0x20,
    0x0, 0x1e, 0x3, 0xa8, 0xa7, 0x98, 0x7a, 0xe1,
    0x0, 0x1e, 0x6, 0x78, 0x70, 0x0, 0x5, 0xb0,
    0x0, 0x1e, 0xa, 0x18, 0x70, 0x0, 0x5, 0xb0,
    0x4, 0x5e, 0x18, 0x8, 0xb7, 0x77, 0x7a, 0xb0,
    0x1, 0xc8, 0x30, 0x8, 0x50, 0x0, 0x5, 0x90,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,

    /* U+6570 "数" */
    0x0, 0x0, 0x52, 0x0, 0x0, 0x40, 0x0, 0x0,
    0x4, 0x30, 0xe1, 0x67, 0x3, 0xf2, 0x0, 0x0,
    0x0, 0xd2, 0xe1, 0xb1, 0x6, 0xc0, 0x0, 0x0,
    0x1, 0x63, 0xe4, 0x4a, 0x39, 0x80, 0x1, 0x70,
    0x15, 0x5c, 0xf9, 0x55, 0x4c, 0x97, 0x8e, 0xb3,
    0x0, 0x3d, 0xf7, 0xb1, 0x1d, 0x0, 0x3e, 0x0,
    0x2, 0xb2, 0xe1, 0x8a, 0x6b, 0x0, 0x6b, 0x0,
    0x27, 0x1, 0xb0, 0x2, 0x73, 0x40, 0x98, 0x0,
    0x0, 0x9, 0xb1, 0x2, 0x10, 0x90, 0xe4, 0x0,
    0x17, 0x8e, 0x87, 0xbc, 0x0, 0xa5, 0xd0, 0x0,
    0x0, 0x97, 0x0, 0xd3, 0x0, 0x4f, 0x50, 0x0,
    0x2, 0xe4, 0x15, 0xa0, 0x0, 0x5f, 0x40, 0x0,
    0x0, 0x16, 0xcf, 0x50, 0x3, 0xc4, 0xe3, 0x0,
    0x0, 0x4, 0xa6, 0xe3, 0x4a, 0x0, 0x6f, 0x60,
    0x4, 0x65, 0x0, 0x17, 0x40, 0x0, 0x6, 0xe3,
    0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,

    /* U+70B9 "点" */
    0x0, 0x0, 0x0, 0x5, 0x30, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0xe3, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0xe, 0x20, 0x0, 0x3a,
    0x0, 0x0, 0x0, 0x0, 0x0, 0xe8, 0x77, 0x77,
    0x73, 0x0, 0x0, 0x0, 0x0, 0xe, 0x20, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x40, 0x0, 0xe2, 0x0,
    0x7, 0x0, 0x0, 0x0, 0xe, 0x87, 0x77, 0x77,
    0x78, 0xf3, 0x0, 0x0, 0x0, 0xe2, 0x0, 0x0,
    0x0, 0x1e, 0x0, 0x0, 0x0, 0xe, 0x20, 0x0,
    0x0, 0x1, 0xe0, 0x0, 0x0, 0x0, 0xe8, 0x77,
    0x77, 0x77, 0x8e, 0x0, 0x0, 0x0, 0xd, 0x10,
    0x0, 0x0, 0x1, 0xb0, 0x0, 0x0, 0x1, 0x20,
    0x30, 0x3, 0x10, 0x14, 0x0, 0x0, 0x0, 0x54,
    0x4, 0x80, 0xc, 0x20, 0x6b, 0x10, 0x0, 0x5e,
    0x10, 0x2e, 0x0, 0x7c, 0x0, 0x8c, 0x0, 0x2d,
    0x50, 0x1, 0xc0, 0x1, 0xc0, 0x0, 0xe1, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0,

    /* U+7F6E "置" */
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
    0xb, 0x87, 0x79, 0x77, 0x97, 0x7c, 0xa0, 0x0,
    0xc3, 0x1, 0xd0, 0xe, 0x0, 0x96, 0x0, 0xc,
    0x30, 0x1d, 0x0, 0xe0, 0x9, 0x60, 0x0, 0xc9,
    0x77, 0x7b, 0x97, 0x77, 0xc6, 0x1, 0x78, 0x77,
    0x77, 0xea, 0x77, 0x79, 0xf5, 0x0, 0x2, 0x0,
    0xc, 0x0, 0x4, 0x0, 0x0, 0x0, 0x9b, 0x77,
    0x97, 0x77, 0xe9, 0x0, 0x0, 0x9, 0x70, 0x0,
    0x0, 0xc, 0x40, 0x0, 0x0, 0x9b, 0x77, 0x77,
    0x77, 0xe4, 0x0, 0x0, 0x9, 0xb7, 0x77, 0x77,
    0x7e, 0x40, 0x0, 0x0, 0x97, 0x0, 0x0, 0x0,
    0xc4, 0x0, 0x0, 0x9, 0xb7, 0x77, 0x77, 0x7e,
    0x40, 0x0, 0x0, 0x97, 0x0, 0x0, 0x0, 0xc4,
    0x81, 0x37, 0x79, 0x87, 0x77, 0x77, 0x79, 0x8a,
    0x70,

    /* U+8282 "节" */
    0x0, 0x0, 0xa, 0x20, 0x0, 0x92, 0x0, 0x0,
    0x0, 0x0, 0x1f, 0x0, 0x1, 0xf0, 0x1, 0x10,
    0x27, 0x77, 0x8f, 0x77, 0x78, 0xf7, 0x7c, 0xe1,
    0x0, 0x0, 0x1f, 0x0, 0x1, 0xf0, 0x0, 0x0,
    0x0, 0x0, 0x1f, 0x0, 0x1, 0xf0, 0x0, 0x0,
    0x0, 0x0, 0x3, 0x0, 0x0, 0x20, 0x51, 0x0,
    0x2, 0x77, 0x77, 0xbc, 0x77, 0x77, 0xe7, 0x0,
    0x0, 0x0, 0x0, 0x6a, 0x0, 0x0, 0xd3, 0x0,
    0x0, 0x0, 0x0, 0x6a, 0x0, 0x0, 0xd3, 0x0,
    0x0, 0x0, 0x0, 0x6a, 0x0, 0x0, 0xe2, 0x0,
    0x0, 0x0, 0x0, 0x6a, 0x0, 0x0, 0xf0, 0x0,
    0x0, 0x0, 0x0, 0x6a, 0x3, 0x69, 0xd0, 0x0,
    0x0, 0x0, 0x0, 0x6a, 0x0, 0x3c, 0x40, 0x0,
    0x0, 0x0, 0x0, 0x6a, 0x0, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x69, 0x0, 0x0, 0x0, 0x0,

    /* U+83DC "菜" */
    0x0, 0x0, 0x5, 0x10, 0x4, 0x30, 0x0, 0x0,
    0x0, 0x0, 0xe, 0x10, 0xc, 0x50, 0x7, 0x10,
    0x27, 0x77, 0x7f, 0x87, 0x7e, 0x97, 0x8b, 0x80,
    0x0, 0x0, 0xe, 0x10, 0xa, 0x34, 0x30, 0x0,
    0x0, 0x0, 0x25, 0x57, 0xad, 0xdb, 0x80, 0x0,
    0x1, 0x56, 0x54, 0x74, 0x10, 0x6, 0x60, 0x0,
    0x0, 0x19, 0x10, 0x1d, 0x10, 0x1e, 0x40, 0x0,
    0x0, 0x5, 0xd0, 0x9, 0x40, 0xa5, 0x0, 0x0,
    0x0, 0x0, 0xa0, 0xd, 0x54, 0x30, 0x3, 0x0,
    0x17, 0x77, 0x77, 0x7f, 0x87, 0x77, 0x8f, 0x80,
    0x0, 0x0, 0x4, 0xdf, 0x66, 0x0, 0x0, 0x0,
    0x0, 0x0, 0x4d, 0x2e, 0x27, 0xa1, 0x0, 0x0,
    0x0, 0x7, 0xa1, 0xe, 0x20, 0x5e, 0xa4, 0x0,
    0x3, 0x83, 0x0, 0xe, 0x20, 0x1, 0xaf, 0xb0,
    0x22, 0x0, 0x0, 0xd, 0x10, 0x0, 0x1, 0x10,

    /* U+914D "配" */
    0x0, 0x0, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0,
    0x26, 0x66, 0x66, 0x8f, 0x47, 0x77, 0x7e, 0x70,
    0x0, 0xd, 0x2c, 0x0, 0x0, 0x0, 0xe, 0x30,
    0x0, 0xd, 0x1c, 0x1, 0x0, 0x0, 0xe, 0x10,
    0xc, 0x7e, 0x8d, 0x8f, 0x20, 0x0, 0xe, 0x10,
    0xe, 0xc, 0x1a, 0x1e, 0x3, 0x0, 0xe, 0x10,
    0xe, 0xb, 0x1a, 0x1e, 0xe, 0x87, 0x7f, 0x10,
    0xe, 0x29, 0x1b, 0x1e, 0xe, 0x10, 0xd, 0x10,
    0xe, 0x72, 0xb, 0xce, 0xe, 0x10, 0x0, 0x0,
    0xe, 0x30, 0x0, 0x1e, 0xe, 0x10, 0x0, 0x0,
    0xe, 0x87, 0x77, 0x8e, 0xe, 0x10, 0x0, 0x0,
    0xe, 0x0, 0x0, 0x1e, 0xe, 0x10, 0x0, 0x30,
    0xe, 0x0, 0x0, 0x1e, 0xe, 0x10, 0x0, 0x70,
    0xe, 0x88, 0x88, 0x9e, 0xe, 0x20, 0x0, 0xb1,
    0xd, 0x0, 0x0, 0x1c, 0x9, 0xee, 0xee, 0xd4
};


/*---------------------
 *  GLYPH DESCRIPTION
 *--------------------*/

static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
    {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
    {.bitmap_index = 0, .adv_w = 256, .box_w = 16, .box_h = 15, .ofs_x = 0, .ofs_y = -1},
    {.bitmap_index = 120, .adv_w = 256, .box_w = 16, .box_h = 16, .ofs_x = 0, .ofs_y = -2},
    {.bitmap_index = 248, .adv_w = 256, .box_w = 16, .box_h = 16, .ofs_x = 0, .ofs_y = -2},
    {.bitmap_index = 376, .adv_w = 256, .box_w = 17, .box_h = 16, .ofs_x = 0, .ofs_y = -2},
    {.bitmap_index = 512, .adv_w = 256, .box_w = 15, .box_h = 15, .ofs_x = 0, .ofs_y = -1},
    {.bitmap_index = 625, .adv_w = 256, .box_w = 16, .box_h = 15, .ofs_x = 0, .ofs_y = -1},
    {.bitmap_index = 745, .adv_w = 256, .box_w = 16, .box_h = 15, .ofs_x = 0, .ofs_y = -1},
    {.bitmap_index = 865, .adv_w = 256, .box_w = 16, .box_h = 15, .ofs_x = 0, .ofs_y = -1}
};

/*---------------------
 *  CHARACTER MAPPING
 *--------------------*/

static const uint16_t unicode_list_0[] = {
    0x0, 0x1019, 0x121b, 0x1d64, 0x2c19, 0x2f2d, 0x3087, 0x3df8
};

/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
    {
        .range_start = 21333, .range_length = 15865, .glyph_id_start = 1,
        .unicode_list = unicode_list_0, .glyph_id_ofs_list = NULL, .list_length = 8, .type = LV_FONT_FMT_TXT_CMAP_SPARSE_TINY
    }
};



/*--------------------
 *  ALL CUSTOM DATA
 *--------------------*/

#if LVGL_VERSION_MAJOR == 8
/*Store all the custom data of the font*/
static  lv_font_fmt_txt_glyph_cache_t cache;
#endif

#if LVGL_VERSION_MAJOR >= 8
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
    .glyph_bitmap = glyph_bitmap,
    .glyph_dsc = glyph_dsc,
    .cmaps = cmaps,
    .kern_dsc = NULL,
    .kern_scale = 0,
    .cmap_num = 1,
    .bpp = 4,
    .kern_classes = 0,
    .bitmap_format = 0,
#if LVGL_VERSION_MAJOR == 8
    .cache = &cache
#endif
};



/*-----------------
 *  PUBLIC FONT
 *----------------*/

/*Initialize a public general font descriptor*/
#if LVGL_VERSION_MAJOR >= 8
const lv_font_t lv_customer_font_SourceHanSerifSC_Regular_16 = {
#else
lv_font_t lv_customer_font_SourceHanSerifSC_Regular_16 = {
#endif
    .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt,    /*Function pointer to get glyph's data*/
    .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt,    /*Function pointer to get glyph's bitmap*/
    .line_height = 16,          /*The maximum line height required by the font*/
    .base_line = 2,             /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
    .subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8
    .underline_position = -1,
    .underline_thickness = 1,
#endif
    .dsc = &font_dsc,          /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
#if LV_VERSION_CHECK(8, 2, 0) || LVGL_VERSION_MAJOR >= 9
    .fallback = NULL,
#endif
    .user_data = NULL,
};



#endif /*#if LV_CUSTOMER_FONT_SOURCEHANSERIFSC_REGULAR_16*/

